package com.jay.relationships.mediator;

import java.util.List;

public class HealthPointTest {
    public static void main(String[] args) {
        HealthRecord healthRecord = new HealthRecord();
        healthRecord.addTask("忌烟酒",5);
        healthRecord.addTask("每周慢跑三次",4);
        healthRecord.addTask("一天喝两升水",5);
        healthRecord.addTask("做够1个小时起来活动5分钟",5);
        healthRecord.addTask("晚上10点按时睡觉",3);
        healthRecord.addTask("晚上8点之后不在饮食",1);

        HealthPointMediator healthPointMediator = new HealthPointMediator(healthRecord);
        List<HealthTask> tasks = healthRecord.getTasks();
        for(HealthTask task : tasks){
            Integer healthPoint = healthPointMediator.calculateHealthPointForTask(task);
            System.out.println(healthPoint);
        }
    }
}
